package qianting.news.behavior.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import qianting.news.apis.models.behavior.dtos.ReadBehaviorDto;
import qianting.news.behavior.service.ApReadBehaviorService;
import qianting.news.common.entity.State;

@Api(tags = "文章阅读管理")
@RestController
@RequestMapping("/")
public class ApReadBehaviorController {

    @Autowired
    private ApReadBehaviorService apReadBehaviorService;

    @ApiOperation(value = "文章阅读")
    @PostMapping("read")
    public State readBehavior(@RequestBody ReadBehaviorDto dto) {
        return apReadBehaviorService.readBehavior(dto);
    }

}
